<section class="content" style="padding: 30px 0;">
    <h4>
        <div class="square"></div>
        <strong>数据字典管理</strong>
    </h4>
    <form class="form-inline">
        <div class="form-group">
            <select class="form-control" ng-model="query.typeCode" name="typeCode"
                    ng-options="option.typeCode as option.typeName for option in typeCodeList">
                <option value="">请选择类型</option>
            </select>
        </div>
        <div class="form-group">
            <input type="text" class="form-control" ng-model="query.itemName" name="itemName" placeholder="请输入名称">
        </div>
        <div class="form-group">
            <button class="btn btn-default" ng-click="paginationSearch(1,pagination.pageSize)">查询</button>
        </div>
        <input type="reset" ng-click="reset()"/>
        <div class="pull-right">
            <a href="javascript:void(0)" class="text-primary" ng-click="showEdit('')" style="margin-right: 20px;">新建</a>
        </div>
    </form>

    <div class="table-body">
        <table class="sn-table">
            <tr>
                <th>类型</th>
                <th>名称</th>
                <th>值</th>
                <th style="width: 20%">描述</th>
                <th style="width: 20%">操作</th>
            </tr>
            <tr ng-repeat="dictItem in pagination.data">
                <td>
                    <span ng-repeat="item in typeCodeList">
                        <span ng-if="item.typeCode==dictItem.typeCode">
                            {{item.typeName}}
                        </span>
                    </span>
                </td>
                <td>
                    {{dictItem.itemName}}
                </td>
                <td>
                    {{dictItem.itemCode}}
                </td>
                <td>
                    {{dictItem.itemDesc}}
                </td>
                <td>
                    <a href="javascript:;" ng-click="showEdit(dictItem.itemId);">修改</a>
                    <a href="javascript:;" ng-click="delete(dictItem.itemId,dictItem.itemName);">删除</a>
                    <a href="javascript:;" ng-click="refreshCache(dictItem.typeCode)">刷新</a>
                </td>
            </tr>
            <tr ng-if="!pagination.data||pagination.data.length<1">
                <td colspan="7">暂无数据</td>
            </tr>
        </table>
    </div>

             <cd-pager style="float: right" page="pagination.page" page-size="pagination.pageSize"
         total="pagination.totalCount" page-action="paginationSearch(page, pageSize, total)"></cd-pager>
</section>